#!/bin/sh

# to_sh.sh
# 
#
# Created by [CGM]sgxiao on 08-12-15.
# Copyright 2008 CGM. All rights reserved.




startYear=1994
endYear=2008
IMPORT_FILE_NAME=top50
RESULT=result.doc
filename=$1
AWKSRC=to_array.awk
PRICEVOLUME=array.top50
#PRICEVOLUME1=array.top50

mkdir ${PRICEVOLUME1}

while [ ${startYear} -le ${endYear} ] 
do
	echo ${startYear}
	awk -f ${AWKSRC} ${startYear}.${IMPORT_FILE_NAME} >  ${startYear}.${PRICEVOLUME}
	startYear=$((startYear + 1))
done

awk -f ${AWKSRC} all.${IMPORT_FILE_NAME} >  all.${PRICEVOLUME}

mv *.${PRICEVOLUME} ../
